<!-- <template>
  <Card>
    <Table class="table" :loading="loading" highlight-row :columns="columns" :data="data"></Table>
    <Page
    show-total
      class="page"
      :total="total"
      :current.sync="current"
      show-elevator
      @on-change="changePage"
    />
  </card>
</template>

<script>
  export default {
    data() {
      return {
        loading: false,
        columns: [
          {title:'微信头像',key: 'headImg',align: "center",
            render: (h, params) => {
              return h("img", {
                style: {
                  width: "60px",
                  marginTop: "5px",
                  'border-radius': '50%'
                },
                attrs: {
                  src: params.row.headImg,
                  // 注意此处的地址是否要加上 this.baseUrl
                }
              })
            }
          },
          { title: "昵称", key: "nickName", align: "center" },
          // { title: "微信用户标识", key: "openid", align: "center" },
          { title: "手机号", key: "phone", align: "center" },
          { title: "生效开始时间", key: "effectiveTime", align: "center" },
          { title: "有效结束时间", key: "failureTime", align: "center" },
        ],
        data: [],
        total: 0,
        current: 1,
        size: 10,

      }
    },
    created(){
      this.getMembers()
    },
    methods:{
      // 获取列表
      getMembers(){
        // console.log();
        this.loading = true
        this.$http(
          "/ztmuseum/stage/member/getMemberList",
          {
            current: this.current,  // 第几页
            size: this.size,        // 每页数据大小
          },
          "post",
          res => {
            if (res.data.code == 1000) {
              this.data = res.data.data.records
              this.total = res.data.data.total
            } else {
              this.$Message.error(res.data.msg);
            }
            this.loading = false;
          }
        );
        // this.$http(
        //   "/stage/member/getMembers",
        //   {
        //     current: this.current,
        //     size: this.size
        //   },
        //   "post",
        //   res => {
        //     if (res.data.code == 200) {
        //       this.data = res.data.data.records
        //       this.total = res.data.data.total
        //     } else {
        //       this.$Message.error(res.data.msg);
        //     }
        //     this.loading = false;
        //   }
        // );
      },
      // 切换页码
      changePage(data){
        this.current = data
        this.getMembers()
      },


    }
  }
</script>

<style scoped>

</style> -->
